package com.vr.xuecheng.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.vr.xuecheng.content.model.entity.CoursePublish;
import com.vr.xuecheng.content.model.vo.CoursePreviewVO;

/**
 * <p>
 * 课程发布 服务类
 * </p>
 *
 * @author hsh
 * @since 2025-02-20
 */
public interface ICoursePublishService extends IService<CoursePublish> {

    /**
     * @param courseId 课程id
     * @return {@code CoursePreviewVO } 课程预览信息
     * 通过id获取课程预览信息
     */
    CoursePreviewVO getCoursePreviewInfo(Long courseId);

    /**
     * @param courseId 课程id
     * @return boolean 是否发布成功
     * 发布课程
     */
    boolean publish(Long courseId);

    /**
     * @param courseId 课程id
     * @return boolean 是否下架成功
     */
    boolean courseOffline(Long courseId);

}
